package com.yinhai.message.implement.dwr.manager;

import com.yinhai.message.implement.dwr.listener.DWRScriptSessionListener;
import org.directwebremoting.ScriptSession;
import org.directwebremoting.impl.DefaultScriptSessionManager;

import java.util.Collection;

/**
 * @author maxp
 * @Create 2017-01-04-15:54
 */
public class DWRScriptSessionManager extends DefaultScriptSessionManager {

    public DWRScriptSessionManager(){
        this.addScriptSessionListener(new DWRScriptSessionListener());
    }

    @Override
    public Collection<ScriptSession> getAllScriptSessions() {
        return DWRScriptSessionListener.getScriptSessions();
    }
}
